<?php
/**
 * Project: AIGC
 * Author: moufer <moufer@163.com>
 * Date: 2024/8/30 23:59
 */

namespace module\user\front\searcher;

use LogicException;
use module\user\model\ScoreLog;
use mof\Request;
use mof\Searcher;

class ScoreSearcher extends Searcher
{
    public function __construct(Request $request)
    {
        parent::__construct();

        $type = $request->get('type');
        if (!in_array($type, ['vip', 'score'])) {
            throw new LogicException('未选择分类');
        }

        $this->model(new ScoreLog)
            ->params(['user' => 1])
            ->order(['listorder' => 'desc']);
    }
}